#include<stdio.h>
#include<string.h>
#include<stdlib.h> 
int main()
{
	int i,j;
	char a[50]="";
	char p;
	gets(a);
	for(i=0;a[i]!='\0';i++)
	{
		if(a[i]>='a'&&a[i]<='z')
		{
		   a[i]=(a[i]+23-'a')%26+'a';
		   a[i]=a[i]-32;
		   continue; 
		}
		if(a[i]>='A'&&a[i]<='Z') 
		{ 
		   a[i]=(a[i]+23-'A')%26+'A';
		   a[i]=a[i]+32;
		}

	
	}
	a[i]='\0';
	i=0;
	j=strlen(a)-1;
	while(i<j)
	{
		p=a[i];
		a[i]=a[j];
		a[j]=p;
		i++;
		j--;
	}
	
puts(a);
	return 0;
 } 
